# -*- coding: utf-8 -*-
from ebank.shortcuts import *
from ebank.alipay import AlipayService


class Index(Handler):
    rule = Rule('/alipay/')
    def get(self):
        alipay = AlipayService()
        tmpl = env.get_template('alipay.html')
        return Response(tmpl.render(
            alipay = alipay,
        ))


class Receive(Handler):
    rule = Rule('/alipay/receive/')
    def post(self):
        return Response("success")


class AutoReceive(Handler):
    rule = Rule('/alipay/autoreceive/')
    def post(self):
        return Response("success")
